package model
{
	import flash.display.InteractiveObject;
	import flash.events.EventDispatcher;
	import flash.net.URLLoader;
	

	public class Character 
	{
		/*
		用户名， 等级， 经验值， 总经验值， 胜次数， 负次数， 虚拟货币数量， （昵称）， 形象url
		*/
		private var _name:String;		// 用户名
		private var _level:int; 		// 等级
		private var _score:int; 		// 经验值
		private var _totalScore:int;	// 当前等级段的总经验值
		private var _winCount:int;		//胜利次数
		private var _loseCount:int; 	//失败次数
		private var _coin:int; 		//虚拟货币
		private var _nickname:String;	//昵称
		private var _url:String;		//形象url
		private var _userId:int;   		//用户id
		private var _result:Object;
		
		private var _dices:Object;
		
		public function Character(userId:int)
		{
			_userId = userId;
		}
		
		public function setInfo(obj:Object):void
		{
			_name = obj["name"];
			_level = obj["level"];
			_score = obj["score"];
			_totalScore = obj["totalcore"];
			_winCount = obj["winount"];
			_loseCount = obj["loseount"];
			_coin = obj["coin"];
			_nickname = obj["nickname"];
			_url = obj["icon"];
		}
		
		public function get userId():int
		{
			return _userId;
		}

		public function set userId(value:int):void
		{
			_userId = value;
		}

		public function get dices():Object
		{
			return _dices;
		}

		public function set dices(value:Object):void
		{
			_dices = value;
		}

		public function get totalScore():int
		{
			return _totalScore;
		}

		public function set totalScore(value:int):void
		{
			_totalScore = value;
		}


		public function get url():String
		{
			return _url;
		}

		public function set url(value:String):void
		{
			_url = value;
		}

		public function get nickname():String
		{
			return _nickname;
		}

		public function set nickname(value:String):void
		{
			_nickname = value;
		}

		public function get coin():int
		{
			return _coin;
		}

		public function set coin(value:int):void
		{
			_coin = value;
		}

		public function get loseCount():int
		{
			return _loseCount;
		}

		public function set loseCount(value:int):void
		{
			_loseCount = value;
		}

		public function get winCount():int
		{
			return _winCount;
		}

		public function set winCount(value:int):void
		{
			_winCount = value;
		}

		public function get score():int
		{
			return _score;
		}

		public function set score(value:int):void
		{
			_score = value;
		}

		public function get level():int
		{
			return _level;
		}

		public function set level(value:int):void
		{
			_level = value;
		}

		public function get name():String
		{
			return _name;
		}

		public function set name(value:String):void
		{
			_name = value;
		}
		
		public function get result():Object
		{
			return _result;
		}
		
		public function set result(value:Object):void
		{
			_result = value;
		}
	}
}